//
//  UIView+BYVC.m
//  ZhiHuiLiJiang
//
//  Created by 胡忠诚 on 2018/11/19.
//  Copyright © 2018 WisdomLijiang. All rights reserved.
//获取当前View的控制器

#import "UIView+BYVC.h"

@implementation UIView (BYVC)
- (UIViewController *)getBYCurrentVC{//获取当前View的控制器
    UIResponder *next = [self nextResponder];
    do {
        if ([next isKindOfClass:[UIViewController class]]) {
            return (UIViewController *)next;
        }
        next = [next nextResponder];
    } while (next != nil);
    return nil;
}


@end
